home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 6_7.lha / 6_7 / 6_7a.c < prev    next >
Text File  |  1993-08-08  |  435b  |  37 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. truct X {
  6.    int i;
  7.    X(int);
  8.    operator+(int);
  9. ;
  10.  
  11. truct Y {
  12.    int i;
  13.    Y(X);
  14.    operator+(X);
  15.    operator int();
  16. ;
  17.  
  18. X operator* (X, Y);
  19. nt f(X);
  20.  
  21. X x = 1;
  22.  y = x;
  23. nt i = 2;
  24.  
  25. ain()
  26.  
  27.    i + 10;
  28.    y + 10;
  29.    y + 10 * y;
  30.    x + y + i;
  31.    x * x + i;
  32.    f(7);
  33.    f(y);
  34.    y + y;
  35.    106 + y;
  36.  
  37.